/*
 * Copyright 2009 Rohan Ranade
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.google.code.fcr;

import java.awt.Color;
import java.awt.Font;

/**
 * Configuration for rendering a card
 * 
 * @author Rohan Ranade
 */
public final class CardRenderConfig {
    private int width;
    private int height;
    private Color backgroundColor;
    private Color sectionBackgroundColor;
    private Color sectionBorderColor;
    private Color textColor;
    private Font nameFont;
    private Font hintFont;
    private Font descriptionFont;

    private static final int DEFAULT_WIDTH = 320;
    private static final int DEFAULT_HEIGHT = 240;
    private static final Color DEFAULT_CARD_BG_COLOR = Color.GRAY;
    private static final Color DEFAULT_SECTION_BG_COLOR = Color.WHITE;
    private static final Color DEFAULT_SECTION_BORDER_COLOR = Color.DARK_GRAY;
    private static final Color DEFAULT_TEXT_COLOR = Color.BLACK;
    private static final Font DEFAULT_NAME_FONT = new Font("Arial", Font.PLAIN, 24);
    private static final Font DEFAULT_HINT_FONT = DEFAULT_NAME_FONT;
    private static final Font DEFAULT_DESC_FONT = DEFAULT_NAME_FONT;

    public CardRenderConfig() {
        setWidth(DEFAULT_WIDTH);
        setHeight(DEFAULT_HEIGHT);
        setBackgroundColor(DEFAULT_CARD_BG_COLOR);
        setSectionBackgroundColor(DEFAULT_SECTION_BG_COLOR);
        setSectionBorderColor(DEFAULT_SECTION_BORDER_COLOR);
        setTextColor(DEFAULT_TEXT_COLOR);
        setNameFont(DEFAULT_NAME_FONT);
        setHintFont(DEFAULT_HINT_FONT);
        setDescriptionFont(DEFAULT_DESC_FONT);
    }

    public Color getBackgroundColor() {
        return backgroundColor;
    }

    public Font getDescriptionFont() {
        return descriptionFont;
    }

    public int getHeight() {
        return height;
    }

    public Font getHintFont() {
        return hintFont;
    }

    public Font getNameFont() {
        return nameFont;
    }

    public Color getSectionBackgroundColor() {
        return sectionBackgroundColor;
    }

    public Color getSectionBorderColor() {
        return sectionBorderColor;
    }

    public Color getTextColor() {
        return textColor;
    }

    public int getWidth() {
        return width;
    }

    public void setBackgroundColor(Color backgroundColor) {
        this.backgroundColor = backgroundColor;
    }

    public void setDescriptionFont(Font descriptionFont) {
        this.descriptionFont = descriptionFont;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public void setHintFont(Font hintFont) {
        this.hintFont = hintFont;
    }

    public void setNameFont(Font nameFont) {
        this.nameFont = nameFont;
    }

    public void setSectionBackgroundColor(Color sectionBackgroundColor) {
        this.sectionBackgroundColor = sectionBackgroundColor;
    }

    public void setSectionBorderColor(Color sectionBorderColor) {
        this.sectionBorderColor = sectionBorderColor;
    }

    public void setTextColor(Color textColor) {
        this.textColor = textColor;
    }

    public void setWidth(int width) {
        this.width = width;
    }
}
